From f905a815888d1315ca8a0dd7336fde2541dbffcf Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 24 Apr 2006 08:47:59 +0000 Subject: [PATCH] Read revision ID --- includes/SpecialImport.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index e349bd5de8..91abcea260 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -122,6 +122,7 @@ function wfSpecialImport( $page = '' ) { */ class WikiRevision { var $title = NULL; + var $id = 0; var $timestamp = "20010115000000"; var $user = 0; var $user_text = ""; @@ -133,6 +134,10 @@ class WikiRevision { $this->title = Title::newFromText( $text ); } + function setID( $id ) { + $this->id = $id; + } + function setTimestamp( $ts ) { # 2003-08-05T18:30:02Z $this->timestamp = wfTimestamp( TS_MW, $ts ); @@ -162,6 +167,10 @@ class WikiRevision { return $this->title; } + function getID() { + return $this->id; + } + function getTimestamp() { return $this->timestamp; } @@ -468,6 +477,11 @@ class WikiImporter { $this->workTitle = $this->appenddata; $this->pageCallback( $this->workTitle ); break; + case "id": + if ( $this->parenttag == 'revision' ) { + $this->workRevision->setID( $this->appenddata ); + } + break; case "text": $this->workRevision->setText( $this->appenddata ); break; -- 2.20.1